package com.ncloud.billing.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import com.ncloud.billing.entity.BsAccount;

@Mapper
public interface BsAccountMapper {
	@Select(value = {"SELECT acct_id, cust_id, acct_name, acct_state,date_format(create_time, '%Y-%m-%d %H:%i:%s' ) as create_time, create_user,date_format(update_time, '%Y-%m-%d %H:%i:%s' ) as update_time, update_user,date_format(destory_time, '%Y-%m-%d %H:%i:%s' ) as destory_time, remark FROM bs_account "
			+ "where cust_id=#{cust_id}"})
	@Results({ @Result(column = "acct_id", property = "acctId"), @Result(column = "cust_id", property = "custId"),
         @Result(column = "acct_name", property = "acctName"),@Result(column = "acct_state", property = "acctState"),
         @Result(column="create_time",property="createTime"),@Result(column="create_user",property="createUser"),
         @Result(column="update_time",property="updateTime"),@Result(column="update_user",property="updateUser"),
         @Result(column="destory_time",property="destoryTime"),@Result(column = "remark", property = "remark")})
	public List<BsAccount> getBsAccountByCustID(Long cust_id);
} 